// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 新增数据资产 新增数据资产 POST /dataAssets/addDataAssets */
export async function addDataAssetsUsingPost(
  body: dataFactory.AddDataAssetsDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/dataAssets/addDataAssets', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除数据资产 通过ID删除数据资产 DELETE /dataAssets/deleteDataAssets/${param0} */
export async function deleteDataAssetsUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.deleteDataAssetsUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/dataAssets/deleteDataAssets/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取数据资产 通过ID获取数据资产 GET /dataAssets/getDataAssets/${param0} */
export async function getDataAssetsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.getDataAssetsUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/dataAssets/getDataAssets/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新数据资产 更新数据资产 PUT /dataAssets/updateDataAssets */
export async function updateDataAssetsUsingPut(
  body: dataFactory.UpdateDataAssetsDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/dataAssets/updateDataAssets', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
